<!DOCTYPE html>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery鼠标经过淡入显示提示框 演示</title>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<style type="text/css">
.div{ border:1px solid #0000FF; float:left; width:200px; height:200px; margin:10px;}
div#tip{ position:absolute; width:100px; height:auto; border:1px solid #00CC66;}
.div1{border:0;cursor:pointer;width:auto; height:auto;}
</style>
</head>

<body>

<div id="tip" style="display:none">提示内容</div>
<div class="div"></div>
<div class="div"></div>
<div class="div div1">enenba</div>
<script type="text/javascript">
 $(document).ready(function(){
  $('.div').hover(
   function(){
    $('#tip').fadeIn('slow');
   }
  );
  
  $('.div').mousemove(function(e){
   var top = e.pageY+5;
   var left = e.pageX+5;
   $('#tip').css({
    'top' : top + 'px',
    'left': left+ 'px'
   });
  });
  
  $('.div').mouseout(function(){
   $('#tip').hide();
  });
  
 });
</script>
</body>
</html>
